package com.hbue.springboot.utils;

import lombok.Getter;

@Getter
public enum ResultCode {
    SUCCESS(200,"操作成功"),
    FAIL(0, "操作失败"),
    NOTFOUND(1, "查询失败！"),
    INSERT_FAIL(2,"插入失败"),
    UPDATE_FAIL(3,"更新失败"),
    DELETE_FAIL(4,"删除失败"),
    MONEY_ERROR(5,"余额不足"),
    ORDER_FINISH(6,"订单已完成无法取消"),
    USER_NOT_EXIST(6,"用户不存在"),
    PASSWORD_ERROR(101, "账户或者密码错误"),
    TOKEN_ERROR(201,"token认证失败"),
    ;


    private int code;
    String msg;
    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
